Merge "Added checks for illegal arguments"