Well no, just “letting them know” isn’t enough, you need in writing them saying that it’s okay to use the license if you want to make a game. DC/WB doesn’t have interest in just their name in a list of credits, they’ll probably have a licensing fee or special agreement to sign for an IP so popular.
Anything short of written consent from the company puts you at risk for having the game shut down and you getting sued unless you never plan on releasing the game. Look at any of the fan games Nintendo’s shut down lately for evidence of that.