CDB-3799 safety checks
Merge pull request #670 from CartoDB/CDB-3799

CDB-3799