compiler: js: js_is_model method to check whether a sequence consists of models or not