Making the getms functions check for nan
The PIC now maintains all of the cross-pin mode clearing and setting
close #27