check for not nil instead of exist