Fix nil errors

This takes care of the case where the dev might pass nil as a block. Without checking, sh** hits the fan!