Check if Fragment is attached before trying to get the Loader