JS: use a try/catch approach instead of instanceof for getting the current Process
JS: use a try/catch approach instead of instanceof for getting the current Process

This is expected to be true always, doing an unconditional cast+return is ever so
margianlly faster in this case, where we don't care about how slow the failure case is.

Signed-off-by: Harvey Harrison <eadbd6b462bf3c97df0300a934c12bc2e5d1fe51@ausenco.com>

jaamsim/jaamsim,jaamsim/jaamsim,jaamsim/jaamsim,jaamsim/jaamsim