Changed the function arguments check