added a method to get a class that is potentially null instead of failing if the class does not exist. Additionally added some more typing information