avoiding null exception