Added logic to ball isvalid?

"