Validate method/function parameters