Matrix constructor check