Shorter way to check boundary

Signed-off-by: Exikle <dixondcunha@hotmail.com>