private function checkSingleAttributes($latitudeAttribute, $longitudeAttribute)
    {
        // Check if both of the are simple
        if (!($latitudeAttribute instanceof ISimple) || !($longitudeAttribute instanceof ISimple)) {
            throw new \InvalidArgumentException('Only simple attributes are allowed.');
        }

        if ($latitudeAttribute->getMetaModel() !== $longitudeAttribute->getMetaModel()) {
            throw new \InvalidArgumentException('The first and second attribute have to be from the same MetaModel.');
        }
    }