nsf.c:
- simplify few inner code pieces based on assertions
- add serveral more assertions based on nonnull sepcifications.