Separated check is_safe function, making some simple tests for this module