Should probably compare strictly here, but I'm wondering if/why it's necessary to allow $post_id to be optional if leaving it null does nothing at all?  Would we ever expect it to not be supplied?