Linear analysis and 3D hybrid simulation study of z-pinch instabilities in the presence of nonideal MHD effects