fixing crash with null values returned from server