Fix segfault when pinMode is called on an invalid pin