handle invalid case

There was a missing test case so I added. 

[#51481101]