add prophylaxis to flag handling

I was accidentally passing J.MALLOCX_ZERO rather than J.MALLOCX_ZERO()
which was causing segfaults.  This ensures that passed arguments are
converted to numbers.  In this case, the function value would be nil
and thus default the flag to 0... better than a segfault IMO.