dimension_check function

Dimension Check