JS: more validation