[JS] - Added a check for console set