Use more specific argument type declaration.

Thanks to @chrismayer for the suggestion. This also removes the
rather ugly-looking `BaseModelInterface.class.isAssignableFrom(clazz)`
and the type cast afterwards.