Added type check in properties attribute

Added type check in properties attribute to only run when the instance is an object.

See http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2 for more details.