Removed unneeded typeof != 'undefined', because we generate the objects ourselves, we can guarantee they exist