Fix wrong type checking for data's property value
Rename method for clarity