diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 91edacf76f..9be02cd010 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -2113,14 +2113,7 @@ function is_post_type_viewable( $post_type ) {
 	 * @param bool         $is_viewable Whether the post type is "viewable".
 	 * @param WP_Post_Type $post_type   Post type object.
 	 */
-	$is_viewable = apply_filters( 'is_post_type_viewable', $is_viewable, $post_type );
-
-	// Make sure the filtered value is a boolean type before returning it.
-	if ( ! is_bool( $is_viewable ) ) {
-		return false;
-	}
-
-	return $is_viewable;
+	return true === apply_filters( 'is_post_type_viewable', $is_viewable, $post_type );
 }
 
 /**
