Trying to get a property of a non-object in 'mymodule_node_access()'
$node in hook_node_access() can be either a string for the content-type or a node object.
I had to test if it was a string or an object.

if (is_string($node)) { 
  return NODE_ACCESS_IGNORE;
}
else {
  // ...
}