Removing the typeof test is probably not a good idea --- but I'm not positive if it will matter