CAS-1397: Add null checks for get and put operations