RF: check separately for Nones to avoid warning

Avoid future warning by checking for two Nones with separate if clauses.
Merge pull request #284 from matthew-brett/none-none-fix

RF: check separately for Nones to avoid warning

Avoid future warning by checking for two Nones with separate if clauses.