Add check for parameter count

Because `undefined offset: 0` errors are butt ugly and not developer friendly.