hasNames function

Row and column name check