The singer reportedly had a fear of being locked in hotel rooms which began during his time in One Direction