Showing how a function handler could still be used in place of the typeof switch, making the code much cleaner