can I call my entity checkCreateAccess function from custom code?
Something like this should do the trick.

use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;    

$entity_type_mgr = \Drupal::getContainer()-&gt;get('entity_type.manager');
if (!$entity_type_mgr-&gt;getAccessControlHandler($type)-&gt;createAccess($bundle)) {
  $permission = "create $bundle $type entities";
  throw new AccessDeniedHttpException("You don't have permission to " . $permission);
}