I don't love this -- checking a specific class isn't done usually in Ruby. If you wanted something like this, you could check the signature of the object.

```ruby
movie.respond_to? :title
```

That way it can be any object, as long as it following the protocol/interface you need.

----------------

More broadly, I'd rather you use a NilClass pattern than return a string. Here's an example library I like: https://github.com/avdi/naught