The implementation of MissingNode returns 0 for calls like "asInt(4)", but I would expect the passed-in default value to be returned instead. This would remove another layer of if checking.
Attached is an example; I would expect val to be 4. Output is:
Value was: 0