use `instance_variable_defined?` instead of `defined?`

we already know the type of thing we're looking for