Null check. Fixes #194