Added more checks for argument