CheckAspect ratio function.