diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index d605846..817a30a 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -1422,7 +1422,9 @@ gtk_application_inhibit (GtkApplication             *application,
 
   g_return_val_if_fail (GTK_IS_APPLICATION (application), 0);
   g_return_val_if_fail (!g_application_get_is_remote (G_APPLICATION (application)), 0);
-  g_return_val_if_fail (application->priv->sm_proxy != NULL, 0);
+
+  if (application->priv->sm_proxy == NULL)
+    return 0;
 
   if (window != NULL)
     {
@@ -1477,6 +1479,10 @@ gtk_application_uninhibit (GtkApplication *application,
 {
   g_return_if_fail (GTK_IS_APPLICATION (application));
   g_return_if_fail (!g_application_get_is_remote (G_APPLICATION (application)));
+  g_return_if_fail (cookie > 0);
+
+  /* Application could only obtain a cookie through a session
+   * manager proxy, so it's valid to assert its presence here. */
   g_return_if_fail (application->priv->sm_proxy != NULL);
 
   g_dbus_proxy_call (application->priv->sm_proxy,
@@ -1509,7 +1515,9 @@ gtk_application_is_inhibited (GtkApplication             *application,
 
   g_return_val_if_fail (GTK_IS_APPLICATION (application), FALSE);
   g_return_val_if_fail (!g_application_get_is_remote (G_APPLICATION (application)), FALSE);
-  g_return_val_if_fail (application->priv->sm_proxy != NULL, FALSE);
+
+  if (application->priv->sm_proxy == NULL)
+    return FALSE;
 
   res = g_dbus_proxy_call_sync (application->priv->sm_proxy,
                                 "IsInhibited",
