refactoring: concatenate Just and Nothing of check