Checking to see if globals are functions instead of just not undefined #20