fix pmpro_has_membership_access() function

pmpro_has_membership_access function conflict with some other plugins like "TimberLibrary" especially when the global $post is null, and it generates a runtime warning.
So we should verify the variable before the assignment instruction (Line 10).
We should verify the global $post variable if it is not empty