Use Args#notNull and thus simplify the method

(cherry picked from commit 82999908fa0f3ad412713825c4341be354b8f1cf)
WICKET-5500 Ignore the path parameters when reading the page class

(cherry picked from commit 28e1b0fe4c297633453c92a0fd36bbac77a93784)