Check schema load path is a directory and avoid NullPointerException.