fix two bugs in nullBinMats():

1. added error message if input matrix is not binary (previously function got trapped in infinite loop)

2. when optimizing, internal objects were renamed and there were two typos.