How do I ensure a method exists before calling it?
<p>A user and a company can log in to my site. </p>

<p>They each have their own object.
So user will have $users = new Users() defined, and company has $place = new Places()..</p>

<p>Now this works fine there is a page where both should see the content.
Inside this page there is a method which checks whether $users->id() is the same as the one you are logged in with. Works fine, but when you log in with company, then it will throw error as $users is not defined.</p>

<p>What should I do about this? Should i just set the $users to false and then check out from this? Or have something to determine what youre logged in with before this statement so it wont execute.. idea?</p>
