Is the current form an entityform form?
Assuming you are trying to implement a *_form_alter() function in a module (which is what I got out of your post), you can implement hook_form_BASE_FORM_ID_alter(), which in this case would be hook_form_node_form_alter(). If you implement this, it will only be executed if/when you are on a node form, and therefore you will know you are in a node form.