Edit nil reference logic.