How about moving this to the bottom of the two `if` branches, so that "null" with no "null" handler gets a custom error message?