<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_check_command(self, timeperiods, t_to_go):
 """Get the check_command if we are in the check period modulation :param t_to_go: time to check if we are in the timeperiod :type t_to_go: :return: A check command if we are in the check period, None otherwise :rtype: alignak.objects.command.Command """

        if not self.check_period or timeperiods[self.check_period].is_time_valid(t_to_go):
            return self.check_command
        return None