check for object keys when defining