fix for null pointer exception while converting JSON string to Post object.