Added WhatIf support as mentioned by Ogail in code review