Runtime tag checking for JS values