master: slight fix to null check