Fix EZP-21621 : logic error in argument type checking