hasProperty by string or object