Catch null entity earlier