Update how properties are set

Probably a minor point, but I wonder if it'd be more efficient to iterate over $options and check if the keys are in $keys instead? Seems like most often the options array will be significantly smaller. Other than that I think this change makes sense, although I'd consider still throwing an exception if the key isn't valid since it's a developer error.