Added safety check to typeahead - really need to figure out why require is borking on this file after a server reload