Updated PHPdoc
Added check if it is a string before attempting to decode json