I would have it be:
```
if ( empty( $post_id ) )
    return;
```