Checking if NOT empty for python imports.

This should be correct.