Gets a value of the attribute for the specified key, or throws an exception if an attribute doesn't exist