UPDATE: Allow null on registerGlobalHandlers