I'd recommend a single if-check