computeAspectRatioOrNull

Compute the aspect ratio, return null if the aspect ratio can't be computed.