<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_check(self) -> bool: """Returns if the current side to move is in check."""

        king = self.king(self.turn)
        return king is not None and self.is_attacked_by(not self.turn, king)