fix backwards NULL check
Merge branch 'mem_select' into blank_check