Can returnType be null? Perhaps it's better to invert this (className.equals(returnType))