Introduced Z_TYPE_ checks for some of the argument functions, fix compiler warning.