Correcting null detection in install SQL