handling null as option