Switch to typeof for perf