Fix #493: Segmentation fault with isnil