Raise exception if provided invalid resource type

Previously this method would return a `nil` object (implicitly) and print
the valid options to STDOUT if provided an invalid resource type.

That makes it tricky to use as a library because there's no clear indication
of failure or that you're going to get the right object type back.

Replace this with an exception that makes it clear the choice is invalid.
This makes it easier to use as a library, easier to test the output, and the
method reads more clearly particulary with regard to what's being returned.

I've also moved the valid options into a class constant to indicate that
they won't be changed at runtime.