[engine] Check if 'id' is a string in require()