handling null for File