enforce jacscript type