PAHMA-738: Reworked logic of non-blank tests.