Added method to check if a named property exists on the object.