Fixed Unserialize Error

Fixed the unserialize error by utilizing the is_serialized function to check if it is serialized before trying to unserialize it