Raise TypeError when given nil keys

This replaces previous NoMethodError #to_s exceptions with a TypeError informing
users that the given class can't be coerced to a String with #to_str