Guard against trying to read args from a shell function object in def.js

Closes #238