Weakly hereditary property of topological spaces