Catch null

Fix #504