val null check before attempting to store