Checking if method arguments are valid.

This ensures the passed arguments are valid.