avoid possible NPEs on classpath scanning