The check is incorrect. You should swap job.getClass and MatrixConfig.
See http://stackoverflow.com/questions/3949260/java-class-isinstance-vs-class-isassignablefrom 
BTW, you can just use (job instanceof MatrixConfiguration)

AFAIK, you can also use getRootProject() method to retrieve project without calling of runtime-check methods.