Returns the specified value as int if possible.

def _cast_int(self, value):
        """Returns the specified value as int if possible."""
        try:
            return int(value)
        except ValueError:
            msg.err("Cannot convert {} to int for line {}.".format(value, self.identifier))
            exit(1)