Don't crash when getMode is passed null