Linearity Criterion for Module Homomorphisms