[#516] Removes scala optionals and fixes checks for blank or null strings