add NoneType check.
Merge pull request #4698 from succhiello/feature/allow_deregister_without_ec2_elbs

add NoneType check.