Fix NPE if class does not exist
Update gitignore