checking if app != nil