[ailyasov] homework2_5: check for maximum value for type