Add missing check to prevent a fatal error in JApplicationSite