null check. fixes #4