Change constructor check to throw and try-catch