Added NullPointedException handlers

Bon appetit
NamedQueries added