How to keep folliage from being placed in walls and other objects

I am not sure if this is the right section for this as I am new here but here goes. Is there anyway when using the foliage brush to tell it to avoid placing foliage in walls that it would collide with? I only ask because I find myself wondering if there is a better way as cleanup can be tedious.