In general: it is always safer to have the bitcoin in you own wallet. A wallet which has a private key noone knows, except you.
In case of a hardfork this is even more important: when you have your own wallet, you have coins in both chains. If it's on an exchange (Coinbase is an exchange) this is completely uncertain what they will do.
https://www.google.nl/search?q=what+to+do+when+hardfork
Edit:
“Ensuring the safety of customer funds is our top priority,” explains the San Francisco-based exchange. “In the event of a hard fork of the Bitcoin protocol, it is likely that Coinbase will temporarily suspend the deposit and withdrawal of bitcoin from the platform pending our assessment of the technical risks posed by any fork, such as the possibility of replay attacks, network instability, or other factors. Customers should take note that they will not be able to withdraw bitcoin from or deposit bitcoin to Coinbase for a period of up to 24 hours or more following the fork. In the event of a hard fork of the Bitcoin protocol, Coinbase may suspend the ability to buy or sell on our platform during this time.”