More sanity checks on the nodeside() function, courtesy ShadowNinja