small fix in a (check if date != null)