Unserialize PHP value only if it was serialized

Content of the article

If its necessary to check is string we got is serialized array and unserialize it if its true - next  function will do this job: