Unity fixes

What happened to our if (val == null) check? We need to write NIL instead of blowing up.