null check for issue #22