use wasNull instead of pre-check