A Regularity Criterion for the 3D Density-Dependent MHD Equations