Created parameter check function, and changed the test case to comply accordingly.